Learn R Programming

CompositionalSR (version 1.0)

Computation of the contiguity matrix W: Computation of the contiguity matrix W

Description

Computation of the contiguity matrix W.

Usage

contiguity(coords, k = 10)

Value

The contiguity matrix W. A square matrix with row standardised values (the elements of each row sum to 1).

Arguments

coords

A matrix with the coordinates of the locations. The first column is the latitude and the second is the longitude.

k

The number of nearest neighbours to consider for the contiguity matrix.

Author

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

See Also

alfa.slx, cv.alfaslx, me.aslx

Examples

Run this code
data(fadn)
W <- contiguity(fadn[, 1:2])

Run the code above in your browser using DataLab